package org.anupta.game.server.inter;

import java.net.InetSocketAddress;

import org.anupta.game.utils.others.Config;
import org.apache.mina.core.service.IoConnector;
import org.apache.mina.transport.socket.nio.NioSocketConnector;

public class InterServer {
	private IoConnector connector = new NioSocketConnector();
	
	public InterServer(){
		connector.setHandler(new InterHandler());
	}
	
	public void bind(int port){
		connector.connect(new InetSocketAddress(Config.INTER_IP,port));
	}
	
	public void close(){
		connector.dispose(true);
	}
}
